/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --white-color: #ffffff;
    --black-color: #000000;
    --gray-color: #6c757d;
    --gray-light-color: #f8f9fa;
    --gray-dark-color: #343a40;
    --transition: all 0.3s ease;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    font-family: var(--font-family);
    font-size: 16px;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: var(--white-color);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: #0056b3;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* 自定义工具类 */
.py-20 {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

.mb-12 {
    margin-bottom: 3rem;
}

.mt-16 {
    margin-top: 4rem;
}

/* 导航栏样式 */
#mainNav {
    background-color: var(--dark-color);
    padding: 1rem 0;
    transition: var(--transition);
    box-shadow: var(--shadow);
    z-index: 1030;
}

#mainNav.navbar-scrolled {
    padding: 0.5rem 0;
    background-color: rgba(26, 32, 44, 0.95);
    box-shadow: var(--shadow-lg);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white-color);
}

.logo-text {
    position: relative;
    padding: 0 0.5rem;
}

.navbar-nav .nav-item .nav-link {
    color: var(--white-color);
    font-weight: 500;
    padding: 0.5rem 1rem;
    margin: 0 0.25rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.navbar-nav .nav-item .nav-link:hover,
.navbar-nav .nav-item .nav-link.active {
    color: var(--primary-color);
    background-color: rgba(255, 255, 255, 0.1);
}

.navbar-toggler {
    border: none;
    outline: none;
    color: var(--white-color);
    font-size: 1.25rem;
}

/* 英雄区域样式 */
.hero-section {
    height: 100vh;
    min-height: 600px;
    background-color: var(--dark-color);
    background-image: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('https://via.placeholder.com/1920x1080');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white-color);
    text-align: center;
    position: relative;
}

.animated-text h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 1s ease forwards;
}

.animated-text p {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 1s ease forwards 0.3s;
}

.btn-custom {
    padding: 0.75rem 2rem;
    font-size: 1.125rem;
    font-weight: 600;
    border-radius: 30px;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 1s ease forwards 0.6s;
}

.btn-primary {
    background-color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-primary:hover {
    background-color: transparent;
    border-color: var(--white-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 123, 255, 0.2);
}

.btn-outline-light {
    border: 2px solid var(--white-color);
    color: var(--white-color);
}

.btn-outline-light:hover {
    background-color: var(--white-color);
    color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(255, 255, 255, 0.1);
}

.scroll-down {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    animation: fadeIn 1s ease forwards 1s;
}

.scroll-down a {
    display: block;
    width: 50px;
    height: 50px;
    line-height: 50px;
    text-align: center;
    color: var(--white-color);
    font-size: 1.5rem;
    border-radius: 50%;
    border: 2px solid var(--white-color);
    transition: var(--transition);
}

.scroll-down a:hover {
    background-color: var(--white-color);
    color: var(--primary-color);
    transform: translateY(-5px);
}

/* 动画 */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 章节标题样式 */
.section-heading {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.section-divider {
    width: 80px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 0 auto;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--gray-color);
    max-width: 700px;
    margin: 0 auto;
}

/* 关于我样式 */
.about-section {
    background-color: var(--light-color);
}

.about-image {
    position: relative;
    z-index: 1;
}

.about-image::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    width: 100%;
    height: 100%;
    background-color: var(--primary-color);
    border-radius: var(--border-radius);
    z-index: -1;
}

.about-image img {
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-xl);
}

.about-content h3 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--dark-color);
}

.about-content p {
    font-size: 1.125rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: var(--gray-color);
}

.personal-info {
    margin: 2rem 0;
}

.info-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-right: 0.5rem;
}

.info-value {
    color: var(--gray-color);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background-color: var(--white-color);
    border: 2px solid var(--gray-light-color);
    border-radius: 50%;
    color: var(--dark-color);
    font-size: 1.25rem;
    transition: var(--transition);
}

.social-icon:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white-color);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.btn-download {
    padding: 0.75rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 30px;
    background-color: var(--primary-color);
    color: var(--white-color);
    border: 2px solid var(--primary-color);
    transition: var(--transition);
}

.btn-download:hover {
    background-color: transparent;
    color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 123, 255, 0.2);
}

/* 技能部分样式 */
.skills-section {
    background-color: var(--white-color);
}

.chart-container {
    position: relative;
    height: 400px;
    margin-bottom: 3rem;
}

.skill-card {
    background-color: var(--white-color);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.skill-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.skill-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background-color: rgba(0, 123, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 2rem;
}

.skill-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.skill-description {
    color: var(--gray-color);
    margin-bottom: 1.5rem;
}

.skill-level {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.level-bar {
    flex-grow: 1;
    height: 8px;
    background-color: var(--gray-light-color);
    border-radius: 4px;
    overflow: hidden;
}

.level-progress {
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 4px;
    transition: width 1.5s ease;
}

.level-text {
    font-weight: 600;
    color: var(--dark-color);
    min-width: 35px;
}

/* 项目部分样式 */
.projects-section {
    background-color: var(--light-color);
}

.project-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    background-color: var(--white-color);
    border: 2px solid var(--gray-light-color);
    border-radius: 30px;
    font-weight: 600;
    color: var(--gray-color);
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white-color);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    background-color: var(--white-color);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.project-image {
    position: relative;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.05);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-info {
    text-align: center;
    color: var(--white-color);
    padding: 1rem;
}

.project-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.project-description {
    margin-bottom: 1rem;
}

.project-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.project-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: var(--white-color);
    border-radius: 50%;
    color: var(--primary-color);
    font-size: 1.25rem;
    transition: var(--transition);
}

.project-link:hover {
    background-color: var(--primary-color);
    color: var(--white-color);
    transform: translateY(-3px);
}

.project-tags {
    padding: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    padding: 0.25rem 0.75rem;
    background-color: var(--gray-light-color);
    border-radius: 30px;
    font-size: 0.875rem;
    color: var(--gray-color);
}

/* 经验部分样式 */
.experience-section {
    background-color: var(--white-color);
}

.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20px;
    width: 4px;
    height: 100%;
    background-color: var(--primary-color);
}

.timeline-item {
    position: relative;
    padding-left: 60px;
    margin-bottom: 3rem;
}

.timeline-icon {
    position: absolute;
    top: 0;
    left: 10px;
    width: 24px;
    height: 24px;
    background-color: var(--primary-color);
    border-radius: 50%;
    transform: translateX(-50%);
    border: 4px solid var(--white-color);
    box-shadow: var(--shadow);
}

.timeline-content {
    background-color: var(--white-color);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.timeline-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.timeline-company {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.timeline-date {
    font-size: 1rem;
    color: var(--gray-color);
    margin-bottom: 1rem;
}

.timeline-description {
    color: var(--gray-color);
    margin-bottom: 1rem;
}

.timeline-achievements ul {
    list-style-type: none;
    padding-left: 0;
}

.timeline-achievements li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--gray-color);
}

.timeline-achievements li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
}

/* 联系部分样式 */
.contact-section {
    background-color: var(--light-color);
}

.contact-info {
    background-color: var(--white-color);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.contact-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--dark-color);
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background-color: rgba(0, 123, 255, 0.1);
    border-radius: 50%;
    color: var(--primary-color);
    font-size: 1.25rem;
    flex-shrink: 0;
}

.contact-details h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.contact-details p {
    margin-bottom: 0;
    color: var(--gray-color);
}

.social-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--dark-color);
}

.contact-form {
    background-color: var(--white-color);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.form-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--dark-color);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--gray-light-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.btn-submit {
    padding: 0.75rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 30px;
    background-color: var(--primary-color);
    color: var(--white-color);
    border: 2px solid var(--primary-color);
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
}

.btn-submit:hover {
    background-color: transparent;
    color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 123, 255, 0.2);
}

#formResponse {
    padding: 1rem;
    border-radius: var(--border-radius);
    text-align: center;
    font-weight: 600;
}

#formResponse.success {
    background-color: rgba(40, 167, 69, 0.1);
    color: var(--success-color);
    border: 2px solid var(--success-color);
}

#formResponse.error {
    background-color: rgba(220, 53, 69, 0.1);
    color: var(--danger-color);
    border: 2px solid var(--danger-color);
}

/* 页脚样式 */
.footer-section {
    background-color: var(--dark-color);
    color: var(--white-color);
}

.footer-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.footer-description {
    color: rgba(255, 255, 255, 0.7);
}

.footer-links ul {
    list-style-type: none;
    padding-left: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--white-color);
    padding-left: 0.5rem;
}

.footer-contact ul {
    list-style-type: none;
    padding-left: 0;
}

.footer-contact li {
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.7);
}

.footer-contact li i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

.footer-copyright {
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

/* 回到顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: var(--white-color);
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 99;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: #0056b3;
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .animated-text h1 {
        font-size: 3rem;
    }
    
    .animated-text p {
        font-size: 1.25rem;
    }
}

@media (max-width: 992px) {
    .navbar-collapse {
        background-color: var(--dark-color);
        padding: 1rem;
        border-radius: var(--border-radius);
        margin-top: 0.5rem;
    }
    
    .navbar-nav .nav-item .nav-link {
        padding: 0.75rem 1rem;
    }
    
    .about-image::before {
        top: 10px;
        left: 10px;
    }
    
    .timeline::before {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .timeline-item {
        padding-left: 0;
        padding-right: 0;
        text-align: center;
    }
    
    .timeline-icon {
        left: 50%;
        transform: translateX(-50%);
    }
}

@media (max-width: 768px) {
    .py-20 {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
    
    .animated-text h1 {
        font-size: 2.5rem;
    }
    
    .animated-text p {
        font-size: 1.125rem;
    }
    
    .btn-custom {
        padding: 0.5rem 1.5rem;
        font-size: 1rem;
    }
    
    .section-heading {
        font-size: 2rem;
    }
    
    .project-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .contact-form, .contact-info {
        margin-bottom: 2rem;
    }
}

@media (max-width: 576px) {
    .animated-text h1 {
        font-size: 2rem;
    }
    
    .animated-text p {
        font-size: 1rem;
    }
    
    .section-heading {
        font-size: 1.75rem;
    }
    
    .skill-card, .project-card, .timeline-content, .contact-form, .contact-info {
        padding: 1.5rem;
    }
    
    .back-to-top {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
        bottom: 1rem;
        right: 1rem;
    }
}